/*
Navicat SQL Server Data Transfer

Source Server         : 本地SqlServer
Source Server Version : 90000
Source Host           : .:1433
Source Database       : mybootstrap
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 90000
File Encoding         : 65001

Date: 2017-01-10 18:07:08
*/


-- ----------------------------
-- Table structure for sys_MenuInfo
-- ----------------------------
DROP TABLE [dbo].[sys_MenuInfo]
GO
CREATE TABLE [dbo].[sys_MenuInfo] (
[MenuID] bigint NOT NULL IDENTITY(1,1) ,
[ParentID] bigint NULL ,
[MenuName] varchar(20) NULL ,
[Menuimg] varchar(30) NULL 
)


GO

-- ----------------------------
-- Records of sys_MenuInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_MenuInfo] ON
GO
SET IDENTITY_INSERT [dbo].[sys_MenuInfo] OFF
GO

-- ----------------------------
-- Table structure for sys_MenuRole
-- ----------------------------
DROP TABLE [dbo].[sys_MenuRole]
GO
CREATE TABLE [dbo].[sys_MenuRole] (
[Mid] bigint NOT NULL IDENTITY(1,1) ,
[MenuID] bigint NULL ,
[RoleID] bigint NULL 
)


GO

-- ----------------------------
-- Records of sys_MenuRole
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_MenuRole] ON
GO
SET IDENTITY_INSERT [dbo].[sys_MenuRole] OFF
GO

-- ----------------------------
-- Table structure for sys_RoleInfo
-- ----------------------------
DROP TABLE [dbo].[sys_RoleInfo]
GO
CREATE TABLE [dbo].[sys_RoleInfo] (
[RoleId] bigint NOT NULL IDENTITY(1,1) ,
[RoleName] varchar(20) NULL ,
[Remark] varchar(50) NULL 
)


GO

-- ----------------------------
-- Records of sys_RoleInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_RoleInfo] ON
GO
SET IDENTITY_INSERT [dbo].[sys_RoleInfo] OFF
GO

-- ----------------------------
-- Table structure for sys_UserInfo
-- ----------------------------
DROP TABLE [dbo].[sys_UserInfo]
GO
CREATE TABLE [dbo].[sys_UserInfo] (
[UserId] bigint NOT NULL IDENTITY(1,1) ,
[UserName] varchar(20) NOT NULL ,
[Userpsw] varchar(30) NOT NULL ,
[Email] varchar(40) NULL ,
[RoleID] bigint NULL 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_UserInfo', 
'COLUMN', N'UserName')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户名'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_UserInfo'
, @level2type = 'COLUMN', @level2name = N'UserName'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户名'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_UserInfo'
, @level2type = 'COLUMN', @level2name = N'UserName'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_UserInfo', 
'COLUMN', N'Userpsw')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户密码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_UserInfo'
, @level2type = 'COLUMN', @level2name = N'Userpsw'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户密码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_UserInfo'
, @level2type = 'COLUMN', @level2name = N'Userpsw'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_UserInfo', 
'COLUMN', N'Email')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'邮箱'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_UserInfo'
, @level2type = 'COLUMN', @level2name = N'Email'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'邮箱'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_UserInfo'
, @level2type = 'COLUMN', @level2name = N'Email'
GO

-- ----------------------------
-- Records of sys_UserInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_UserInfo] ON
GO
SET IDENTITY_INSERT [dbo].[sys_UserInfo] OFF
GO

-- ----------------------------
-- Table structure for sys_UserRole
-- ----------------------------
DROP TABLE [dbo].[sys_UserRole]
GO
CREATE TABLE [dbo].[sys_UserRole] (
[mID] bigint NOT NULL IDENTITY(1,1) ,
[UserID] bigint NULL ,
[RoleID] bigint NULL 
)


GO

-- ----------------------------
-- Records of sys_UserRole
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_UserRole] ON
GO
SET IDENTITY_INSERT [dbo].[sys_UserRole] OFF
GO

-- ----------------------------
-- Indexes structure for table sys_MenuInfo
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table sys_MenuInfo
-- ----------------------------
ALTER TABLE [dbo].[sys_MenuInfo] ADD PRIMARY KEY ([MenuID])
GO

-- ----------------------------
-- Indexes structure for table sys_MenuRole
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table sys_MenuRole
-- ----------------------------
ALTER TABLE [dbo].[sys_MenuRole] ADD PRIMARY KEY ([Mid])
GO

-- ----------------------------
-- Indexes structure for table sys_RoleInfo
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table sys_RoleInfo
-- ----------------------------
ALTER TABLE [dbo].[sys_RoleInfo] ADD PRIMARY KEY ([RoleId])
GO

-- ----------------------------
-- Indexes structure for table sys_UserInfo
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table sys_UserInfo
-- ----------------------------
ALTER TABLE [dbo].[sys_UserInfo] ADD PRIMARY KEY ([UserId])
GO

-- ----------------------------
-- Indexes structure for table sys_UserRole
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table sys_UserRole
-- ----------------------------
ALTER TABLE [dbo].[sys_UserRole] ADD PRIMARY KEY ([mID])
GO
